package vistas.abstractModels;

import java.util.ArrayList;

import javax.swing.AbstractListModel;

public class SelectionListModel extends AbstractListModel<Object>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4781899914803923984L;
	private ArrayList<Object> listado;
	
	public SelectionListModel(ArrayList<Object> list) {
		listado = list;
	}
	
	@Override
	public int getSize() {
		return listado.size();
	}

	@Override
	public Object getElementAt(int index) {
		return listado.get(index);
	}
	
	public void addElement(Object obj) {
	    listado.add(obj);
	}
	
	public void removeElement(Object obj) {
	    listado.remove(obj);
	}
	
	public ArrayList<Object> getList(){
		return listado;
	}

}
